/**
* @author Saerom Kim <kim79881@gmail.com>
* @version 1.6
* @since 2011-11-09
*/

import java.util.Currency;

public class MoneyCurrency
{
 	private long amount;
        private Currency currency;

        public Money(long amount, Currency currency)
        {
                this.amount = amount;
                this.currency = currency;
        }
        public long getAmount()
        {
                return amount;
        }
        public String getCurrency()
        {
                return currency;
        }
        public String toString()
        {
		String sign = (amount < 0 ? "-" : "");
		Long absAmount = (amount < 0 ? -amount : amount);
		String code = currency.getSymbol();
		int fractDigits = currency.getDefaultFractionDigit();
		int unit = tenToPower(fractDigits);
		if(fractDigits > 0)
		{
			return sign + absAmount/unit + "." 
				+ fill(fractDigits, absAmount % unit)+code;
		}
		else
			return sign + absAmount + code;
        }
	private int fill(int fractDigits, long l)
	{
		return 0;
	}
	private int tenToPower(int fractDigits)
	{
		return (int)Math.pow(10, fractDigits);
	}
        public int compareTo(Money m)
        {
                return 0;
	}
	public boolean equals(Object o)
	{
		return true;
	}
	public int hashCode()
	{
		return 0;
	}
	public Money plus(Money m)
	{
		return null;
	}
	public Money minus(Money m)
	{
		return null;
	}
	public Money times(double factor)
	{
		return null;
	}
	public Money dicidedBy(double divisor)
	{
		return null;
	}
	public Money negate()
	{
		return null;
	}
}

